package com.easyidea.its.facade.tracklog;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import com.easyidea.its.domain.model.passport.TrackLog;
import com.easyidea.its.domain.model.system.Department;
import com.easyidea.its.domain.model.system.PassPort;
import com.easyidea.its.web.dto.CarSeizureDto;
import com.easyidea.its.web.dto.StatisticsDto;

public interface TrackLogMgr {
	/**
	 * 根据条件获取最近跟踪资料
	 * @param passPortName
	 * @param direction
	 * @param searchLeastRecord TODO
	 * @param tracklogId TODO
	 * @param passTime TODO
	 * @return
	 */
	TrackLog getLatestTrackLogByCondition(String passPortName, String direction, boolean searchLeastRecord, Integer tracklogId, Date passTime);
	/**
	 * 获取最新跟踪记录id
	 * @param passPortName
	 * @param direction
	 * @param searchLeastRecord
	 * @return
	 */
	Integer getLatestTrackLogId(String passPortName, String direction, boolean searchLeastRecord);
	/**
	 * 获取所有部门信息
	 * @return
	 */
	Collection<Department> getAllDepartments();
	/**
	 * 根据部门查询部门管辖的卡口
	 * @param deptId
	 * @return
	 */
	Collection<PassPort> getPassPortsByDeptId(Integer deptId);
	/**
	 * 根据卡口名称查卡口
	 * @param passPortName
	 * @return
	 */
	List<String> getDirectionsByPassPortName(String passPortName);
	/**
	 * 根据条件查询车辆追踪记录
	 * @param carSeizureDto
	 * @param startIndex TODO
	 * @param pageSize TODO
	 * @return
	 */
	List<TrackLog> getTrackLogsByCondition(CarSeizureDto carSeizureDto, int startIndex, int pageSize);
	/**
	 * 根据条件查询车辆追踪记录总数
	 * @param carSeizureDto
	 * @return
	 */
	int getTrackLogsCountByCondition(CarSeizureDto carSeizureDto);
	/**
	 * 所有卡口
	 * @return
	 */
	Collection<PassPort> getAllPassPorts();
	/**
	 * 修改车牌号码
	 * @param id
	 * @param platNumber
	 * @return
	 */
	boolean modifyPlatNumber(Integer id, String plateNumber);
	
	Collection<Object[]> statisticsByCondition(StatisticsDto statisticsDto);
	
	
}
